<template>
    <div class='caseshow-bg'>
        <div class="caseshow-inner w">
            <my-title :title="title" />
            <div class="caseshow-shows">
                <dl v-for="msg in messages" :key="msg.id">
                    <dt class="caseshow-list">
                        <img :src="msg.img_url" alt="" />
                        <div class="caseshow-list-focus">+</div>
                        <div class="caseshow-list-cover">{{msg.category}}</div>
                    </dt>
                    <dd>{{msg.title}}</dd>
                </dl>
            </div>
            <div class="caseshow-more">查看更多&gt;</div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            title: ["客户定制案例展示", "CASE DEMONSTRATION"],
            // 测试数据
            messages: [
                {
                    id: 1,
                    img_url: require("@/assets/img/model01.png"),
                    category: "网站设计及开发",
                    title: "温州科技馆"
                },
                {
                    id: 2,
                    img_url: require("@/assets/img/model02.png"),
                    category: "网站设计及开发",
                    title: "花瓣美思"
                },
                {
                    id: 3,
                    img_url: require("@/assets/img/model03.png"),
                    category: "软件界面设计",
                    title: "现金贷"
                },
                {
                    id: 4,
                    img_url: require("@/assets/img/model04.png"),
                    category: "软件界面设计",
                    title: "速米金融"
                },
                {
                    id: 5,
                    img_url: require("@/assets/img/model05.png"),
                    category: "APP设计及开发",
                    title: "猫眼电影"
                },
                {
                    id: 6,
                    img_url: require("@/assets/img/model06.png"),
                    category: "APP设计及开发",
                    title: "慢钱新媒体运营小组"
                },
                {
                    id: 7,
                    img_url: require("@/assets/img/model07.png"),
                    category: "企业VI 设计",
                    title: "teddy bear"
                },
                {
                    id: 8,
                    img_url: require("@/assets/img/model08.png"),
                    category: "企业VI 设计",
                    title: "银河国际购物中心"
                }
            ]
        };
    }
};
</script>

<style lang='css' scoped>
.caseshow-bg {
    background: #f5f7fa url("../../assets/img/border01.png") repeat-x center
        bottom;
}
.caseshow-bg .caseshow-inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-content: flex-start;
    padding-bottom: 160px;
}
.caseshow-inner .caseshow-shows {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-flow: wrap;
}
.caseshow-shows dl {
    display: flex;
    justify-content: center;
    flex-flow: wrap;
    margin-top: 20px;
    width: 270px;
    height: 230px;
}
.caseshow-shows dl .caseshow-list {
    position: relative;
    display: flex;
    justify-content: center;
    flex-flow: wrap;
    border-radius: 4px 4px;
    overflow: hidden;
    box-shadow: 0 0 24px #8b96a0;
    width: 100%;
    height: 170px;
    font-size: 18px;
    z-index: 79;
}
.caseshow-list .caseshow-list-cover {
    cursor: pointer;
    position: absolute;
    padding: 50px 98px;
    box-sizing: border-box;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    line-height: 30px;
    text-align: center;
    color: #fff;
    z-index: 80;
}
.caseshow-list .caseshow-list-focus {
    cursor: pointer;
    position: absolute;
    top: 60px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    line-height: 34px;
    text-align: center;
    font-size: 2rem;
    z-index: 81;
    opacity: 0;
    transition: opacity .5s; 
    -webkit-transition: opacity .5s; 
}
.caseshow-shows dl dd {
    padding: 20px 0px;
    color: #3d4450;
    font-size: 1.125rem;
}
.caseshow-inner .caseshow-more {
    cursor: pointer;
    margin-top: 30px;
    width: 180px;
    height: 50px;
    border: 1px solid #01c7b3;
    border-radius: 4px 4px;
    text-align: center;
    line-height: 48px;
    font-size: 1.125rem;
    color: #01c7b3;
}
.caseshow-inner .caseshow-more:hover {
    background-color: #01c7b3;
    color: #fff;
}
.caseshow-list:hover .caseshow-list-cover {
    color: #bebdbd;
}
.caseshow-list:hover .caseshow-list-focus {
    opacity: 1;
}
</style>